
import 'package:fget_file/config_model.dart';
import 'package:flutter/material.dart';
import 'package:fget_file/fget_file_page.dart';
import 'package:flutter/services.dart';

void main() {
  SystemChrome.setSystemUIOverlayStyle( SystemUiOverlayStyle(statusBarColor: Colors.transparent,statusBarIconBrightness: Brightness.dark),);
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Builder(builder: (context){
        return Scaffold(
          appBar: AppBar(title: Text("文件筛选"),),
          backgroundColor: Colors.white,
          body: Padding(
            padding: EdgeInsets.all(15),
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                MaterialButton(
                  onPressed: () {
                    Navigator.push(context, MaterialPageRoute(builder: (context)=>
                        FgetFilePage(
                          configModel: ConfigModel(
                            types: ["mp4",]
                          ),
                          callback: (v){
                            print(v);
                          },
                        ),
                      ),
                    );
                  },
                  child: Text("-打开文件筛选器-"),
                  color: Colors.blue,
                ),
                Text("当前筛选的文件："),
              ],
            ),
          ),
        );
      })
    );
  }
}
